<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>财务设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>

<!-- 后台面包导航 -->
{:get_admin_breadcrumb()}

<blockquote class="layui-elem-quote" style="margin-top:10px;">说明：财务设置</blockquote>

<form class="layui-form" action="">
<input type="hidden"  name="groupname" value="{$Request.action}">
<div class="layui-tab layui-tab-brief " lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this" >充值设置</li>
    <li>提现设置</li>

  </ul>

  <div class="layui-tab-content" style="height: 100px;">
    <div class="layui-tab-item layui-show">


              <div class="layui-form-item">
                <label class="layui-form-label">充值最少金额：</label>
                <div class="layui-input-inline" style="width:100px">
                  <input class="layui-input" type="number" name="data[recharge_min]"  placeholder="" autocomplete="off" class="layui-input" value="{$settings.finance.recharge_min}">
                </div>
                <div class="layui-form-mid layui-word-aux">{:about('不填或者0代表不限制。充值最少金额')}</div>
              </div>

         </div>

            
 <div class="layui-tab-item">

             <div class="layui-form-item">
                <label class="layui-form-label">提现手续费：</label>
                <div class="layui-input-inline" style="width:100px">
                 <input class="layui-input" type="number" name="data[withdraw_fee]"  placeholder="" autocomplete="off" class="layui-input" value="{$settings.finance.withdraw_fee}">
                </div>
                  <div class="layui-form-mid layui-word-aux">%</div>
              </div>
      
               <div class="layui-form-item">
                <label class="layui-form-label">单日提现最小金额：</label>
                <div class="layui-input-inline" style="width:100px">
                 <input class="layui-input" type="number" name="data[withdraw_min]"  placeholder="" autocomplete="off" class="layui-input" value="{$settings.finance.withdraw_min}">
                </div>
                  <div class="layui-form-mid layui-word-aux">元</div>
              </div>    
               <div class="layui-form-item">
                <label class="layui-form-label">单日提现最大金额：</label>
                <div class="layui-input-inline" style="width:100px">
                 <input class="layui-input" type="number" name="data[withdraw_max]"  placeholder="" autocomplete="off" class="layui-input" value="{$settings.finance.withdraw_max}">
                </div>
                  <div class="layui-form-mid layui-word-aux">元，0或者空格，代表不限金额，最大金额不得小于最小金额</div>
              </div>  

             <div class="layui-form-item">
                <label class="layui-form-label">提现平台或者银行：</label>
                <div class="layui-input-inline" style="width:400px">
                {foreach $banklist as $key=>$vo } 
                      <input type="checkbox" name="data[withdraw_bank][{$key}]" lay-skin="primary" title="{$vo.name}" {if !empty($settings['finance']['withdraw_bank'][$key])} checked {/if} >
                
               {/foreach}
                </div>
                <div class="layui-form-mid layui-word-aux"></div>
              </div>

    
</div>



           <div class="layui-form-item">
            <label class="layui-form-label"></label>
              <div class="layui-input-block">
                  <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="form">确 定</button>
              </div>
            </div> 
</div> 
</form>

<script>
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(form)', function(data){
    // layer.msg(JSON.stringify(data.field));
    var data =data.field;
    $.post("{:url('settings/update')}",data,function(json){
       if(json.code == 0){
           layer.msg(json.msg);
       }else if(json.code == -1){
           layer.msg(json.msg);
       }
    });
    return false;
  });
});
</script>

</body>

</html>